fix: display app version in More menu#97
fix: display app version in More menu#97Bortlesboat wants to merge 1 commit intowebadderall:mainfrom
Conversation
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
Electron Types & Bridge electron/electron-env.d.ts, electron/preload.ts |
Added window.electronAPI.getAppVersion(): Promise<string> type and exposed getAppVersion in the preload bridge (ipcRenderer.invoke("app:getVersion")). |
Main IPC Handler electron/ipc/handlers.ts |
Added ipcMain.handle('app:getVersion', () => app.getVersion()) to return the application version from the main process. |
Version Display UI src/components/launch/LaunchWindow.tsx |
Added appVersion React state, a mount-only useEffect that calls window.electronAPI.getAppVersion() with cancellation guarding, error logging, and conditional rendering of a centered v{appVersion} label in the "more" dropdown. |
Sequence Diagram(s)
sequenceDiagram
participant Renderer as Renderer<br/>(LaunchWindow)
participant Preload as Preload<br/>(electronAPI)
participant Main as Main Process<br/>(IPC Handler)
participant App as Electron App
Renderer->>Renderer: useEffect on mount
Renderer->>Preload: electronAPI.getAppVersion()
Preload->>Main: ipcRenderer.invoke("app:getVersion")
Main->>App: app.getVersion()
App-->>Main: "X.Y.Z"
Main-->>Preload: "X.Y.Z"
Preload-->>Renderer: Promise resolves "X.Y.Z"
Renderer->>Renderer: set appVersion and render label
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
🐇 I hopped from main into the render light,
A tiny version string made my heart bright.
From app to bridge to dropdown view,
Now users see the version true.
🥕✨
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. | |
| Description check | ❓ Inconclusive | The description covers Summary and Test Plan but is missing key template sections like Type of Change, Screenshots/Video, and a completed Checklist. | Add Type of Change checkbox, provide the requested screenshot of the version display, and complete all checklist items before merging. |
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title 'fix: display app version in More menu' clearly and specifically describes the main change - fixing the display of the app version in the More dropdown menu. |
| Linked Issues check | ✅ Passed | The PR successfully addresses issue #70 by exposing the app version through IPC handlers, preload bridges, and displaying it in the UI, directly fixing the version mismatch problem reported. |
| Out of Scope Changes check | ✅ Passed | All changes are within scope: IPC handler setup, preload bridge exposure, TypeScript type definitions, and UI rendering of the version are all necessary and directly related to fixing issue #70. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Could you attach a screenshot of what this looks like? |
|
Also, PR is not updated against main |
Add IPC handler to expose app.getVersion() to the renderer and display it in the More dropdown menu. Users can now verify which version they're running. Fixes webadderall#70 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fb8cb21 to
4b7f594
Compare
|
Rebased onto main. Re: screenshot — I don't have the native build deps to run the Electron app locally. The change adds a small |
Summary
app:getVersionIPC handler inelectron/ipc/handlers.tsto exposeapp.getVersion()to the renderer processgetAppVersionin the preload bridge and add its type definitionTest plan
versionfield inpackage.jsonFixes #70
🤖 Generated with Claude Code
Summary by CodeRabbit